const http = require("http");

const server = http.createServer((req, res) => {
  // console.log("请求进来了");
  let arr = [];

  req.on("data", (data) => {
    arr.push(data);
  });

  req.on("end", () => {
    console.log(Buffer.concat(arr).toString());
    res.end("拿到了客户端的数据11111");
  });
});

server.listen(1234, (socket) => {
  console.log("服务启动了");
});
